package com.longcai.mapper.goods;

import com.longcai.entity.homegood.ClyjGoodsBrand;
import com.longcai.entity.homepage.GoodsClass;

import java.util.List;
import java.util.Map;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

/**
 * <p>
 * 商品品牌表 Mapper 接口
 * </p>
 *
 * @author LWK
 * @since 2019-03-22
 */
@Mapper
@Repository
public interface ClyjGoodsBrandMapper extends BaseMapper<ClyjGoodsBrand> {

	List<ClyjGoodsBrand> getBrandsByClassId(String classId);

	@Select("select c.* from goods_class c , clyj_goods_class_brand cb where c.id = cb.goods_class_id and cb.goods_brand_id = #{brandId} order by c.type_sort")
	List<GoodsClass> listByBrandId(String brandId);
	void insertType(Map map);

	void deleteType(String brandId);

}
